package com.tenqian.enums;

/**
 * Created by Administrator on 2017/7/18.
 */
public enum ResultEnum {
    UNKONW_ERROR(-1, "未知错误"),
    SUCCESS(0, "成功"),
    LOGIN_ERROR(1, "用户名或密码错误"),
    REGIST_ERROR(2, "注册失败,请检查参数"),
    REGIST_SERVER_ERROR(3, "注册失败,服务器错误"),
    DUPLICATE_PHONENUMBER_ERROR(4, "手机号已被占用"),
    LOGIN_SERVER_ERROR(5, "登录失败,服务器错误"),
    UNLOGIN_ERROR(6, "请先登录!"),
    ADD_FRIEND_ERROR(7, "添加好友失败"),
    UNKNOWN_PRODUCT_CODE(8, "未知的商品编号"),;

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
